<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" href="../../app/js/bootstrap-3.3.7-dist/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="../../app/css/footer.css" />
		<link rel="stylesheet" type="text/css" href="../../app/css/backstage.css" />
		<style type="text/css">
			/*修改底部字体颜色*/
			
			.foot:nth-child(2) {
				color: #e83023;
			}
			
			#wrap div#content {
				padding-top: 1.2rem;
			}
		</style>
		<script src="../../app/js/flexible.min.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<div id="wrap">
			<div id="main">
				<div id="header">
					<a href="../../app/view/coalition/colalition.html" class="ly-headleft">首页</a>
					<a href="../../app/view/personage/person_setting.html" class="ly-headright">设置</a>
					<p id="headTitle">创客管理</p>
				</div>
				<div id="content">
					<div class="ly-panel">
						<div class="panel panel-default">
							<div class="panel-heading">
								<a class="ly-ahead"><span><img src="../asset/xinxi.png"/>信息：</span>
									<p>消息通知</p>
								</a>
							</div>
							<div class="panel-body">
								<ul class="ly-ul">
									<li style="border-top: 0px;">
										<a>
											<p>吉林建材科技有限公司成功签约仁和联盟吉林建材科技有限公司成功签约仁和联盟</p>
										</a>
									</li>
									<li>
										<a>
											<p>吉林建材科技有限公司成功签约仁和联盟</p>
										</a>
									</li>
									<li>
										<a>
											<p>吉林建材科技有限公司成功签约仁和联盟</p>
										</a>
									</li>
								</ul>
							</div>
						</div>
						<div class="row" style="text-align: center;">
							<div class="col-xs-6 col-sm-6">
								<a href="backstage_commerialList.html" class="ly-ablock">
									<p><img class="ly-backimg" src="../asset/shanghu.png" /></p>
									<p>商户</p>
								</a>
							</div>
							<div class="col-xs-6 col-sm-6">
								<a href="backstage_trade.html" class="ly-ablock">
									<p><img class="ly-backimg" src="../asset/jiaoyi.png" /></p>
									<p>交易</p>
								</a>
							</div>
							<div class="col-xs-6 col-sm-6">
								<a href="backstage_property.html" class="ly-ablock">
									<p><img class="ly-backimg" src="../asset/zhican.png" /></p>
									<p>资产</p>
								</a>
							</div>
							<div class="col-xs-6 col-sm-6">
								<a href="person_myinfo.html" class="ly-ablock">
									<p><img class="ly-backimg" src="../asset/xiaoxi.png" /></p>
									<p>消息</p>
								</a>
							</div>
						</div>
						<a href="backstage_strategy.html">
							<p class="ly-borderp" style="">创客攻略</p>
						</a>
					</div>
				</div>
			</div>

		</div>

	</body>
	<script src="../../app/js/jquery-2.2.3.min.js"></script>
	<script src="../../app/js/jquery.cookie.js"></script>
	<script type="text/javascript" src="../../app/js/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
	<script type="text/javascript">
		var tokenReztApp = $.cookie("tokenReztApp");
		if(!tokenReztApp) {
			window.location.href = "../../app/view/login/login/login.html";
		}
		$(function() {
			currentyf();
		});

		//用户信息
		var user, role,goodsId;
		//获取当前会员信息
		function currentyf() {
			$.ajax({
				cache: false,
				type: "GET",
				url: "http://47.104.13.109/member-service/auth/current?token=" + tokenReztApp,
				dataType: "JSON",
				async: false,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					$.removeCookie('tokenReztApp', {
						expires: 7,
						path: '/'
					});
					$.removeCookie("tokenRh", {
						expires: 7,
						path: '/'
					});
					$.removeCookie('memberId', {
						expires: 7,
						path: '/'
					});
					$.removeCookie('roleId', {
						expires: 7,
						path: '/'
					});
					window.location.href = "../../app/view/login/login/login.html";
				},
				success: function(data) {
					var check = true;
					for(var i = 0; i < data.roleList.length; i++) {
						var roles = data.roleList[i].id;
						var deadline = new Date(data.roleList[i].deadline);
						if(roles == "f2" && deadline >= new Date()) {
							check = false;
							role = roles;
						}
					}
					if(check) {
						alert("权限不足，请升级为创客！");
						window.location.href = "../../app/view/login/login/login.html";
					}
					goodsId = data.id;
					user = data.loginName;
				}
			});
		}
		$(function() {
			searchUserInfo(1, 100);
		})

		var pageNums, pageSizes;
		//查询收到的信息
		function searchUserInfo(pageNum, pageSize) {
			pageNums = pageNum;
			pageSizes = pageSize;
			$.ajax({
				type: "GET",
				url: "http://47.104.13.109/information-service/information/searchUser",
				dataType: "JSON",
				data: {
					'pageNum': 1,
					'pageSize': 3,
					'receiveRole': role,
					'receivePerson': goodsId
				},
				async: false,
				success: function(data) {
					console.log(data)
					var html = "";
					for(var i = 0; i < data.pageInfo.list.length; i++) {
						list = data.pageInfo.list[i];
						html += "<li><a><p>" + list.inforContent + "</p></a></li>";
					}
					$('.ly-ul').html(html);
				}
			});
		}
		/*$.ajax({
			type: "get",
			url: "http://47.104.13.109/information-service/information/searchUser?pageNum=1&pageSize=1&receiveRole=1&receivePerson=114",
			async: true,
			success: function(data) {
				console.log(data);
				var a = '';
				for(var i = 0; i < data.pageInfo.list.length; i++) {
					a += "<li><a><p>" + data.pageInfo.list[i].inforContent + "</p></a></li>";
				};
				$('.ly-ul').html(a);
			}
		});*/
	</script>

</html>